import request from '@/utils/request'
import {getPersonalAwardsByIds} from "@/api/Manage/personalAward.js";

export function getStudentAward(params) {
    return request.post('/student/award/get/personal/award', params);
}


export function deleteStudentAward(id) {
    return request.delete(`/student/award/deleteById/${id}`);
}
/**
 * 根据id来查询学生获奖信息
 */
export function getStudentAwardById(id) {
    return request.get(`/student/award/getById/${id}`);
}

export function updateStudentAward(studentAwardData) {
    return request.put('/student/award/update', studentAwardData);
}

export function saveStudentAward(studentAwardData) {
    return request.post('/student/award/save', studentAwardData);
}

//根据多个id批量查询数据
export function getStudentAwardByids(params) {
    return request.post('/student/award/getByIds', params, {
    });
}

//批量导出
export function exportStudentAward(params) {
    return request.post('/student/award/export', params, {
        responseType: 'blob'
    });
}
// @/api/Manage/studentAward.js

// 提交导出任务
export function submitExportTask(params) {
    return request.post('/export/async', params)
}

// 获取导出任务状态
export function getExportStatus(taskId) {
    return request.get(`/export/status/${taskId}`)
}

// 下载导出文件
export function downloadExportFile(taskId) {
    return request.get(`/export/download/${taskId}`, {
        responseType: 'blob'  // 确保响应类型为 Blob
    })
}
